#include "app_params.h"
#include "stream.h"

using namespace std;


app_parameters get_main_parameters(INT argc, CHAR *argv[])
{
    UINT_PTR pipeInRaw  = NULL;
    UINT_PTR pipeOutRaw = NULL;
    string pipeName = "";

    for(INT i=0; i<argc; ++i) {
        if( strncmp(argv[i], "-p", 3) == 0 ) {
            pipeName = argv[i+1];
         }
     }

    OUTSTREAM<<"argc = "<<argc<<endl; PRINTOUT;

    for(INT i=0; i<argc; ++i) {
        OUTSTREAM<<"par"<<i<<" = "<<argv[i]<<endl; PRINTOUT;
    }

    OUTSTREAM<<"Name: " <<pipeName<<endl; PRINTOUT;

    return app_parameters(pipeName);
}